package com.appspot.bs24event.controller.gyojitter;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import com.appspot.bs24event.service.GyojitterService;

public class GyojiitController extends Controller {
    private GyojitterService service = new GyojitterService();

    @Override
    public Navigation run() throws Exception {
        // メッセージ
        String message = requestScope("message");

        // TwitterServiceのtweetを呼び出す
        service.tweet(message);

        requestScope("result", "つぶやきました。");
        // index.jspに遷移する
        return forward("gyojitter/gyojiit.jsp");
    }
}
